<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        /* 非真既假,非假既真 */
        var a = true
        var b = false
        console.log(!a);    //false
        console.log(!b);    //true

        /* && 并且,需要&&的两边都为true的时候,结果为true */
        console.log(true && true);
        console.log(true && false);
        console.log(false && true);
        console.log(false && false);

        /* || 但凡两边有一边为true,那么结果为true */
        console.log(true || true);
        console.log(true || false);
        console.log(false || true);
        console.log(false || false);
    </script>
</body>

</html>